/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lestr.udm.core2;

import java.io.InputStream;

/**
 *
 * @author pibonnin
 */
public interface IDataManager<P extends IDataManager.IParameters> {


    public ISession openSession() throws GdmException;


    public P getParameters();


    public static interface ISession {


        boolean addData(String id) throws GdmException;


        boolean existsData(String id) throws GdmException;


        boolean removeData(String id) throws GdmException;


        boolean setDataValue(String id,
                             InputStream value) throws GdmException;


        InputStream getDataValue(String id) throws GdmException;


        long getDataLength(String id) throws GdmException;


        boolean commit() throws GdmException;


        boolean close() throws GdmException;


    }// END Interface ISession


    public static interface IParameters {
    }// END Interface IParameters


}// END Class DataManager
